package com.bestv.search.common.dataSource;

public class DataSourceContextHolder {
    private static final ThreadLocal<Object> holder = new ThreadLocal<Object>();

    public static DataSourceKey getDataSourceKey() {
        return (DataSourceKey) holder.get();
    }

    public static void setDataSourceKey(DataSourceKey siteCode) {
        holder.set(siteCode);
    }

    public static void clearDataSourceKey() {
        holder.remove();
    }
}